<html>
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
		<title>Панель администратора. Добавление новой новости</title>
		<script type="text/javascript" src="/resources/tiny_mce/tiny_mce.js"></script>
 
		<script type="text/javascript">
    		tinyMCE.init({
        		mode:"textareas",
        		theme:"advanced",
        		language:"ru"
    		});
		</script>
	</head>
	<body>
		<form action="/addnews" method="post">
			{% if node %}
				<div><input type="text" size="120" name="title" value="{{ node.title }}"></div>
      			<div><input type="text" name="imageaddr" value="{{ node.imageaddr }}"></div>
      			<div><textarea name="description" rows="3" cols="100">{{ node.description }}</textarea></div>
      			<div><textarea name="content" rows="30" cols="100">{{ node.content }}</textarea></div>
      			<div><input type="hidden" name="actions" value="edit"></div>
      			<div><input type="hidden" name="id" value={{ node.key.id }}></div>
			{% else %}
				<div><input type="text" name="title"></div>
      			<div><input type="text" name="imageaddr"></div>
      			<div><textarea name="description" rows="3" cols="60"></textarea></div>
      			<div><textarea name="content" rows="30" cols="60"></textarea></div>
      			<div><input type="hidden" name="actions" value="add"></div>
      		{% endif %}
      			<div><input type="submit" value="Sign"></div>
      			<div><a href="/admin">Отменить и верунуться к панели администратора</a></div>
    	</form>
	</body>
</html>